using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._TradeAreas
{
    /// <summary>
    /// <para>Generate Drive Time Trade Areas</para>
    /// <para>Creates a feature class of trade areas around point features based on travel time and distance.</para>
    /// <para>根据行驶时间和距离创建围绕点要素的贸易区的要素类。</para>
    /// </summary>    
    [DisplayName("Generate Drive Time Trade Areas")]
    public class GenerateDriveTimeTradeArea : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateDriveTimeTradeArea()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input point feature layer.</para>
        /// <para>输入点要素图层。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the drive time polygons.</para>
        /// <para>包含行驶时间面的输出要素类。</para>
        /// </param>
        /// <param name="_distance_type">
        /// <para>Distance Type</para>
        /// <para>The method of travel that will be used for drive time calculation.</para>
        /// <para>将用于计算行驶时间的行驶方法。</para>
        /// </param>
        public GenerateDriveTimeTradeArea(object _in_features, object _out_feature_class, object _distance_type)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
            this._distance_type = _distance_type;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Generate Drive Time Trade Areas";

        public override string CallName => "ba.GenerateDriveTimeTradeArea";

        public override List<string> AcceptEnvironments => ["baDataSource", "baNetworkSource", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _distance_type, _distances, _units, _id_field, _dissolve_option.GetGPValue(), _remove_overlap.GetGPValue(), _travel_direction.GetGPValue(), _time_of_day, _time_zone.GetGPValue(), _search_tolerance, _polygon_detail.GetGPValue(), _input_method.GetGPValue(), _expression];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input point feature layer.</para>
        /// <para>输入点要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the drive time polygons.</para>
        /// <para>包含行驶时间面的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Distance Type</para>
        /// <para>The method of travel that will be used for drive time calculation.</para>
        /// <para>将用于计算行驶时间的行驶方法。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _distance_type { get; set; }


        /// <summary>
        /// <para>Distances</para>
        /// <para>The distances that will be used for drive time calculations.</para>
        /// <para>将用于计算行驶时间的距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distances")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _distances { get; set; } = null;


        /// <summary>
        /// <para>Distance Units</para>
        /// <para>The units that will be used for the distance values. The default value is miles.</para>
        /// <para>将用于距离值的单位。默认值为英里。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _units { get; set; } = null;


        /// <summary>
        /// <para>ID Field</para>
        /// <para>A unique ID field for existing facilities.</para>
        /// <para>现有设施点的唯一 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _id_field { get; set; } = null;


        /// <summary>
        /// <para>Dissolve Option</para>
        /// <para><xdoc>
        ///   <para>Specifies whether overlapping or nonoverlapping service areas for a single location will be used when multiple distances are specified.</para>
        ///   <bulletList>
        ///     <bullet_item>Overlap— Each polygon will include the area reachable from the facility up to the distance value. This is the default.</bullet_item><para/>
        ///     <bullet_item>Split— Each polygon will include only the area between consecutive distance values.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定指定多个距离时，是使用单个位置的重叠服务区还是非重叠服务区。</para>
        ///   <bulletList>
        ///     <bullet_item>重叠- 每个面将包括从设施点到距离值可到达的区域。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>分割 - 每个面将仅包括连续距离值之间的区域。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dissolve Option")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _dissolve_option_value _dissolve_option { get; set; } = _dissolve_option_value._OVERLAP;

        public enum _dissolve_option_value
        {
            /// <summary>
            /// <para>Overlap</para>
            /// <para>Overlap— Each polygon will include the area reachable from the facility up to the distance value. This is the default.</para>
            /// <para>重叠- 每个面将包括从设施点到距离值可到达的区域。这是默认设置。</para>
            /// </summary>
            [Description("Overlap")]
            [GPEnumValue("OVERLAP")]
            _OVERLAP,

            /// <summary>
            /// <para>Split</para>
            /// <para>Split— Each polygon will include only the area between consecutive distance values.</para>
            /// <para>分割 - 每个面将仅包括连续距离值之间的区域。</para>
            /// </summary>
            [Description("Split")]
            [GPEnumValue("SPLIT")]
            _SPLIT,

        }

        /// <summary>
        /// <para>Remove Overlap</para>
        /// <para><xdoc>
        ///   <para>Specifies whether overlapping concentric rings will be created or overlap will be removed from multiple locations in relation to one another.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Polygons will be split and the overlap between output features will be removed.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Output features will be created with overlap. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是创建重叠的同心环，还是从彼此相关的多个位置移除重叠环。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将分割面并移除输出要素之间的重叠。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将创建具有重叠的输出要素。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Remove Overlap")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _remove_overlap_value _remove_overlap { get; set; } = _remove_overlap_value._false;

        public enum _remove_overlap_value
        {
            /// <summary>
            /// <para>REMOVE_OVERLAP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REMOVE_OVERLAP")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>KEEP_OVERLAP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_OVERLAP")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Travel Direction</para>
        /// <para><xdoc>
        ///   <para>Specifies the direction of travel that will be used between stores and customers.</para>
        ///   <bulletList>
        ///     <bullet_item>Toward Stores—The direction of travel will be from customers to stores. This is the default.</bullet_item><para/>
        ///     <bullet_item>Away from Stores—The direction of travel will be from stores to customers.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定商店和客户之间将使用的行进方向。</para>
        ///   <bulletList>
        ///     <bullet_item>朝向商店 - 行进方向将从客户到商店。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>远离商店 - 行进方向将从商店到客户。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel Direction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _travel_direction_value _travel_direction { get; set; } = _travel_direction_value._TOWARD_STORES;

        public enum _travel_direction_value
        {
            /// <summary>
            /// <para>Toward Stores</para>
            /// <para>Toward Stores—The direction of travel will be from customers to stores. This is the default.</para>
            /// <para>朝向商店 - 行进方向将从客户到商店。这是默认设置。</para>
            /// </summary>
            [Description("Toward Stores")]
            [GPEnumValue("TOWARD_STORES")]
            _TOWARD_STORES,

            /// <summary>
            /// <para>Away from Stores</para>
            /// <para>Away from Stores—The direction of travel will be from stores to customers.</para>
            /// <para>远离商店 - 行进方向将从商店到客户。</para>
            /// </summary>
            [Description("Away from Stores")]
            [GPEnumValue("AWAY_FROM_STORES")]
            _AWAY_FROM_STORES,

        }

        /// <summary>
        /// <para>Time of Day</para>
        /// <para>The time and date that will be used when calculating distance.</para>
        /// <para>计算距离时将使用的时间和日期。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time of Day")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_of_day { get; set; } = null;


        /// <summary>
        /// <para>Time Zone</para>
        /// <para><xdoc>
        ///   <para>Specifies the time zone that will be used for the Time of Day parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Time Zone at Location—The time zone in which the territories are located will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>UTC—Coordinated universal time (UTC) will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于“时间”参数的时区。</para>
        ///   <bulletList>
        ///     <bullet_item>位置时区—将使用区域所在的时区。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>UTC—将使用协调世界时 （UTC）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Zone")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _time_zone_value _time_zone { get; set; } = _time_zone_value._TIME_ZONE_AT_LOCATION;

        public enum _time_zone_value
        {
            /// <summary>
            /// <para>UTC</para>
            /// <para>UTC—Coordinated universal time (UTC) will be used.</para>
            /// <para>UTC—将使用协调世界时 （UTC）。</para>
            /// </summary>
            [Description("UTC")]
            [GPEnumValue("UTC")]
            _UTC,

            /// <summary>
            /// <para>Time Zone at Location</para>
            /// <para>Time Zone at Location—The time zone in which the territories are located will be used. This is the default.</para>
            /// <para>位置时区—将使用区域所在的时区。这是默认设置。</para>
            /// </summary>
            [Description("Time Zone at Location")]
            [GPEnumValue("TIME_ZONE_AT_LOCATION")]
            _TIME_ZONE_AT_LOCATION,

        }

        /// <summary>
        /// <para>Search Tolerance</para>
        /// <para><xdoc>
        ///   <para>The maximum distance that input points can be from the network. Points located beyond the search tolerance will be excluded from processing.</para>
        ///   <para>This parameter requires a distance value and units for the tolerance. The default value is 5000 meters.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入点与网络的最大距离。超出搜索容差范围的点将被排除在处理范围之外。</para>
        ///   <para>此参数需要距离值和公差单位。默认值为 5000 米。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _search_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Polygon Detail</para>
        /// <para><xdoc>
        ///   <para>Specifies the level of detail that will be used for the output drive time polygons.</para>
        ///   <bulletList>
        ///     <bullet_item>Standard— Polygons with a standard level of detail will be created. This is the default.</bullet_item><para/>
        ///     <bullet_item>Generalized—Generalized polygons will be created using the hierarchy present in the network data source to produce results quickly.</bullet_item><para/>
        ///     <bullet_item>High— Polygons with a high level of detail will be created for applications in which precise results are important.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于输出行驶时间多边形的细节级别。</para>
        ///   <bulletList>
        ///     <bullet_item>标准 - 将创建具有标准细节级别的面。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>广义—将使用网络数据源中存在的层次结构创建广义面，以快速生成结果。</bullet_item><para/>
        ///     <bullet_item>高 - 将为精确结果很重要的应用程序创建具有高细节级别的多边形。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Polygon Detail")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _polygon_detail_value _polygon_detail { get; set; } = _polygon_detail_value._STANDARD;

        public enum _polygon_detail_value
        {
            /// <summary>
            /// <para>Standard</para>
            /// <para>Standard— Polygons with a standard level of detail will be created. This is the default.</para>
            /// <para>标准 - 将创建具有标准细节级别的面。这是默认设置。</para>
            /// </summary>
            [Description("Standard")]
            [GPEnumValue("STANDARD")]
            _STANDARD,

            /// <summary>
            /// <para>Generalized</para>
            /// <para>Generalized—Generalized polygons will be created using the hierarchy present in the network data source to produce results quickly.</para>
            /// <para>广义—将使用网络数据源中存在的层次结构创建广义面，以快速生成结果。</para>
            /// </summary>
            [Description("Generalized")]
            [GPEnumValue("GENERALIZED")]
            _GENERALIZED,

            /// <summary>
            /// <para>High</para>
            /// <para>High— Polygons with a high level of detail will be created for applications in which precise results are important.</para>
            /// <para>高 - 将为精确结果很重要的应用程序创建具有高细节级别的多边形。</para>
            /// </summary>
            [Description("High")]
            [GPEnumValue("HIGH")]
            _HIGH,

        }

        /// <summary>
        /// <para>Input Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of value that will be used for each drive time.</para>
        ///   <bulletList>
        ///     <bullet_item>Values—A constant value will be used (all trade areas will be the same size). This is the default.</bullet_item><para/>
        ///     <bullet_item>Expression— The values from a field or an expression will be used (trade areas can be a different size).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于每个行驶时间的值的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>值—将使用常量值（所有贸易区域的大小相同）。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>表达式— 将使用字段或表达式中的值（贸易区域可以是不同的大小）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _input_method_value _input_method { get; set; } = _input_method_value._VALUES;

        public enum _input_method_value
        {
            /// <summary>
            /// <para>Values</para>
            /// <para>Values—A constant value will be used (all trade areas will be the same size). This is the default.</para>
            /// <para>值—将使用常量值（所有贸易区域的大小相同）。这是默认设置。</para>
            /// </summary>
            [Description("Values")]
            [GPEnumValue("VALUES")]
            _VALUES,

            /// <summary>
            /// <para>Expression</para>
            /// <para>Expression— The values from a field or an expression will be used (trade areas can be a different size).</para>
            /// <para>表达式— 将使用字段或表达式中的值（贸易区域可以是不同的大小）。</para>
            /// </summary>
            [Description("Expression")]
            [GPEnumValue("EXPRESSION")]
            _EXPRESSION,

        }

        /// <summary>
        /// <para>Distance Expression</para>
        /// <para>A fields-based expression used to calculate drive time.</para>
        /// <para>用于计算行驶时间的基于字段的表达式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _expression { get; set; } = null;


        public GenerateDriveTimeTradeArea SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}